package com.cwl.base.day01;

/**
 * @program: java_base
 * @description: 条件运算符（三元运算符）
 * @author: ChenWenLong
 * @create: 2019-11-05 15:10
 **/
public class TestOperator06 {

    public static void main(String[] args) {
        int  score = 80;
        int  x = -100;
        String   type = score<60?"不及格":"及格";
        System.out.println(type);

        if(score<60){
            System.out.println("不及格");
        }else{
            System.out.println("及格");
        }

        System.out.println(x > 0 ? 1 : (x == 0 ? 0 : -1));

    }
}
